<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<%@ include file="/WEB-INF/views/include/head.jsp"%>
<link rel="stylesheet" href="${ctxStatic}/css/list.css">
<script src="${ctxStatic}/jquery/jquery-1.9.1.min.js"></script>
<script src="${ctxStatic}/js/DateTimePicker.js"></script>
<script type="text/javascript">
	// 检索按钮实装方法
	function searchListForm() {
		var searchParam = $("#itemNameCn").val();
		$.post("${ctx}/material/message/searchList?itemNameCn="+searchParam, "", function(result) {
			var listHtml = result["category"];
			var pageHtml = result["page"];
			$("#listHtml").html(listHtml);
			$("#paging").html(pageHtml);
		}, 'json');
	}
	//重置
	function clean() {
		$("input").val("");
	}
</script>
</head>
<body>
	<div class="listArea" id="infoList" >
		<form id="searchForm" method="post">
			<div class="listBg" >
				<div class="searchArea clearfix">
					<div class="searchLeft clearfix">
						<div class="searchInp clearfix">
							<p>
								<spring:message code="category_itemNameCn" />
							</p>
							<input class="w-styleNub" id="itemNameCn" name="itemNameCn" value="">
						</div>
					</div>
					<div class="searchRight clearfix" id="subItem">
						<!-- 新建 -->
						<shiro:hasPermission name="material:stock:edit">
							<button type="button" class="btn-cj"
								onclick="popup('935px','550px','${ctx}/material/message/form')">
								<spring:message code="category_create" />
							</button>
						</shiro:hasPermission>
						<!-- 重置 -->
						<button type="button" class="btn-js" onclick="clean();">
							<spring:message code="category_reset" />
						</button>
						<!-- 查询 -->
						<button type="button" class="btn-js" onclick="searchListForm();">
							<spring:message code="commom_check" />
						</button>
					</div>
				</div>
				<div class="tableArea" >
					<div class="tableScroll" style = "height:385px">
						<table cellpadding="0" class="tableHead">
							<thead>
								<tr>
									<th><p class="table-No">
											<spring:message code="common_no" />
										</p></th>
									<th><p class="table-xmCD">
											<spring:message code="category_code" />
										</p></th>
									<th><p class="table-zwmc">
											<spring:message code="category_Cn" />
										</p></th>
									<th><p class="table-ywmc">
											<spring:message code="category_En" />
										</p></th>
									<th><p class="table-zt">
											<spring:message code="category_state" />
										</p></th>
									<th><p class="table-ms">
											<spring:message code="category_remarks" />
										</p></th>
									<th><p class="table-cjz">
											<spring:message code="category_creater" />
										</p></th>
									<th><p class="table-rq">
											<spring:message code="category_createDate" />
										</p></th>
								</tr>
							</thead>
						</table>
						<table cellpadding="0" class="tableBody"  style ="width:600px" >
								<tbody  id = "listHtml">
								</tbody>
						</table>
					</div>
				</div>
			</div>
			<div id = "paging" ></div>
		</form>
	</div>
</body>
<script type="text/javascript">
	$(document).ready(function(){
		searchListForm()
		});
</script>
</html>